package com.learn.design.lsp.v1;

/**
 * 里式替换
 *
 * @author Administrator
 */
public class Client {
    public static void main(String[] args) {
        //产生三毛这个士兵
        Soldier sanMao = new Soldier();
        // 给三毛一支枪
        sanMao.setGun(new ToyGun());
        sanMao.killEnemy();
    }
}
